import cv2
img = cv2.imread('/home/hpclib/dataset/MF_S01E24_1min/frames_1.jpg') 
imgInfo = img.shape
size = (imgInfo[1],imgInfo[0])
print(size)

videoWrite = cv2.VideoWriter('/home/hpclib/dataset/2.avi',cv2.VideoWriter_fourcc('I', '4', '2', '0'),24,size)

for i in range(1,1100):
    fileName = '/home/hpclib/dataset/MF_S01E24_1min/frames_'+str(i)+'.jpg'
    img = cv2.imread(fileName)
    #print img.shape
    print img

    videoWrite.write(img)


print('end!')